//
//  UILabel+AWTheme.m
//  changeShin
//
//  Created by Alan Wang on 2019/3/26.
//  Copyright © 2019 Alan Wang. All rights reserved.
//

#import "UILabel+AWTheme.h"
#import "NSObject+AWTheme.h"

@implementation UILabel (AWTheme)
-(void)AWTheme_HighlightedForKey:(NSString*)key{
    AWweakify(self)
    [self saveBlok:^{
        AWstrongify(self)
        self.highlighted = [[AWThemeManager shareInstance] boolForKey:key];
    } forKey:@"highlighted"];
}
-(void)AWTheme_HighlightedTextColorForKey:(NSString*)key{
    AWweakify(self)
    [self saveBlok:^{
        AWstrongify(self)
        self.highlightedTextColor = [[AWThemeManager shareInstance] colorForKey:key];
    } forKey:@"highlightedTextColor"];
}
-(void)AWTheme_ShadowColorForKey:(NSString*)key{
    AWweakify(self)
    [self saveBlok:^{
        AWstrongify(self)
        self.shadowColor = [[AWThemeManager shareInstance] colorForKey:key];
    } forKey:@"shadowColor"];
}
-(void)AWTheme_TextColorForKey:(NSString*)key{
    AWweakify(self)
    [self saveBlok:^{
        AWstrongify(self)
        self.textColor = [[AWThemeManager shareInstance] colorForKey:key];
    } forKey:@"textColor"];
}
-(void)AWTheme_FontForKey:(NSString*)key{
    AWweakify(self)
    [self saveBlok:^{
        AWstrongify(self)
        self.font = [[AWThemeManager shareInstance] fontForKey:key];
    } forKey:@"font"];
}
-(void)AWTheme_BoldFontForKey:(NSString*)key{
    AWweakify(self)
    [self saveBlok:^{
        AWstrongify(self)
        self.font = [[AWThemeManager shareInstance] boldfontForKey:key];
    } forKey:@"boldfont"];
}
@end
